1. Field of the Invention
The present invention relates to a data rewriting technique, and particularly relates to data rewriting control when a write fault occurs.
2. Description of the Related Art
In a conventional magnetic disk apparatus, if a write fault occurs while data is being written, data is rewritten in a predetermined number of sectors located before the sector where the write fault has occurred. A conventional technology has been disclosed, for example, in Japanese Patent Application Laid-open No. H5-207789.
The reason for rewriting the data in the sectors located before the sector where the write fault occurs is as follows. Due to intermittent nature of servo sampling for detecting an offtrack position, if a write fault occurs due to the offtrack position or the like, it is probable that data in sectors between a previous servo frame (where it is assumed that data is written at a normal track position) of a servo frame where the offtrack position is detected and a servo frame where the offtrack position is detected is written off track. Therefore, it is necessary to rewrite the data in the sectors between the two servo frames to a center of a track.
Thus, the number of sectors in which data is to be rewritten should include the sector including the servo frame where the write fault is detected.
Generally, a magnetic disk is divided into zones from an outer periphery to an inner periphery to increase a recording density of the magnetic disk. The number of sectors varies in every track from the outermost track to the innermost track in a zone. However, the number of servo frames of all the tracks in a zone is the same to keep the servo sampling constant.
More sectors are present between any two servo frames towards the outer periphery, and smaller sectors are present between any two servo frames towards the inner periphery. However, the maximum number of sectors between two frames in the outermost track is generally set as a fixed value for the number of sectors in which the data is to be rewritten.
However, in the conventional technology, if a write fault is included in sectors where the writing process is completed, the write fault remains unaddressed because no determination process is carried out to determine whether the data needs to be rewritten in the sectors where the writing process has been completed.
Even if it is determined that the writing process is successfully completed at the point in time when the writing is completed, the data itself may possibly be written off track due to the offtrack position of the head. Furthermore, the magnetic disk apparatus installed in a portable device (such as a portable data tool or a portable music player) likely to be carried on a train or plane, or when walking or hiking, etc, is constantly at risk of being subjected to continuous jolts or being exposed to variations in atmospheric pressure. As newer devices that use magnetic disk apparatuses emerge, a rewriting process is essential to meet the challenges in the form of environment in which the devices are likely to be used.